<template>
    <mobileNavigation-vue v-if="isMobileTerminal" />
    <pcNavigation-vue v-else />
</template>

<script setup>
import { watch } from 'vue'
import mobileNavigationVue from './mobile/index.vue'
import pcNavigationVue from './pc/index.vue'
import { isMobileTerminal } from '@/utils/flexble'
import { useStore } from 'vuex'

watch(
    () => isMobileTerminal.value,
    (newVal) => {
        console.log(newVal)
    }
)

//这个函数是Vuex的Composition API插件中的一个全局函数，用于在Vue组件中获取Vuex store实例。
const store = useStore()

//触发 categorys 获取数据
store.dispatch('category/useCategoryData')
</script>
<style lang="scss" scope></style>
